package cn.zymall.order.dao;

import cn.zymall.common.model.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: mall
 * @description: 订单持久层
 * @author: YueNiao
 * @email: 1486617253@qq.com
 * @create: 2020-08-17 22:03
 **/
@Repository
public interface OrderMapper extends BaseMapper<Order> {
	/**
	 * 系统订单查询
	 * @param userId
	 * @param orderStatus
	 * @return
	 */
	List<Order> queryOrder(@Param("userId") String userId,@Param("orderStatus") String orderStatus);

	/**
	 * 模糊查询
	 * @param userId
	 * @param orderStatus
	 * @param value
	 * @return
	 */
	List<Order> dimQueryOrder(@Param("userId") String userId,@Param("orderStatus") String orderStatus,@Param("value") String value);

	/**
	 * 商家查询
	 * @param merchantId
	 * @param orderStatus
	 * @return
	 */
	List<Order> merchantQueryOrder(@Param("merchantId")String merchantId,@Param("orderStatus") String orderStatus);

	/**
	 * 商家模糊查询
	 * @param merchantId
	 * @param orderStatus
	 * @param value
	 * @return
	 */
	List<Order> dimMerchantQueryOrder(@Param("merchantId")String merchantId,@Param("orderStatus") String orderStatus,@Param("value") String value);
}
